import service from '@/utils/request'

// @Tags Classify
// @Summary 创建企业分类
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Classify true "创建企业分类"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /classify/createClassify [post]
export const createClassify = (data) => {
  return service({
    url: '/classify/createClassify',
    method: 'post',
    data
  })
}

// @Tags Classify
// @Summary 删除企业分类
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Classify true "删除企业分类"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /classify/deleteClassify [delete]
export const deleteClassify = (data) => {
  return service({
    url: '/classify/deleteClassify',
    method: 'delete',
    data
  })
}

// @Tags Classify
// @Summary 批量删除企业分类
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除企业分类"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /classify/deleteClassify [delete]
export const deleteClassifyByIds = (data) => {
  return service({
    url: '/classify/deleteClassifyByIds',
    method: 'delete',
    data
  })
}

// @Tags Classify
// @Summary 更新企业分类
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Classify true "更新企业分类"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /classify/updateClassify [put]
export const updateClassify = (data) => {
  return service({
    url: '/classify/updateClassify',
    method: 'put',
    data
  })
}

// @Tags Classify
// @Summary 用id查询企业分类
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Classify true "用id查询企业分类"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /classify/findClassify [get]
export const findClassify = (params) => {
  return service({
    url: '/classify/findClassify',
    method: 'get',
    params
  })
}

// @Tags Classify
// @Summary 分页获取企业分类列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取企业分类列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /classify/getClassifyList [get]
export const getClassifyList = (params) => {
  return service({
    url: '/classify/getClassifyList',
    method: 'get',
    params
  })
}
